package com.qzimp.fujiancuo.service.impl;

import com.qzimp.fujiancuo.entity.Temple;
import com.qzimp.fujiancuo.mapper.TempleMapper;
import com.qzimp.fujiancuo.service.TempleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TempleServiceImpl implements TempleService {

    @Autowired
    private TempleMapper templeMapper;

    @Override
    public Temple findById(Long id) {
        return templeMapper.findById(id);
    }

    @Override
    public List<Temple> findAll() {
        return templeMapper.findAll();
    }

    @Override
    public void addTemple(Temple temple) {
        templeMapper.insert(temple);
    }

    @Override
    public void updateTemple(Temple temple) {
        templeMapper.update(temple);
    }

    @Override
    public void deleteTemple(Long id) {
        templeMapper.delete(id);
    }
}